package everyday;

import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @Author: Siantar
 * @Date: 2023-05-29-22:06
 * @Description: 1.0
 */
public class T2455 {
    public int averageValue(int[] nums) {
        return (int)Arrays.stream(nums).filter(a->a%6==0).average().orElse(0xd);
//        return Arrays.stream(nums).boxed().filter(a->(a%6)==0).collect(Collectors.averagingInt(a->a)).intValue();
    }
    @Test
    public void test() {
        System.out.println(averageValue(new int[]{1,3,6,10,12,15}));
    }
}
